<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<html:html>
    <head>
        <title>Gestion EDT - Modules</title>

        <link rel="stylesheet" type="text/css" href="resources/css/design.css" />
        <link rel="stylesheet" type="text/css" href="resources/css/design_print.css" media="print" />
        <link rel="stylesheet" type="text/css" href="resources/css/modules.css" />
        
        <script type="text/javascript" src="resources/js/script.js"></script>
    </head>
    <body>
        <jsp:include page="_menu.jsp" />

        <h1 class="titrePage">Liste des modules</h1>

        <table class="liste" id="listeModules">
            <thead>
                <th class="actions" colspan="2" />
                <th>Libellé</th>
                <th>UE</th>
                <th>Effectif max</th>
                <th>Terminé ?</th>
            </thead>
            <tbody>
                <logic:iterate id="module" name="ModulesForm" property="modules" indexId="i">
                    <tr class="${i%2==0 ? "paire" : "impaire"}">
                        <td>
                            <html:link
                                action="/GererModules?action=afficher"
                                paramId="idModule"
                                paramName="module" paramProperty="id">
                                <img src="resources/images/edit.png" alt="Modifier" />
                            </html:link>
                        </td>
                        <td>
                            <html:link
                                action="/GererModules?action=supprimer"
                                linkName="suppression"
                                paramId="idModule"
                                paramName="module" paramProperty="id">
                                <img src="resources/images/del.png" alt="Supprimer" />
                            </html:link>
                        </td>

                        <td>${module.libelle}</td>
                        <td>${module.ue}</td>
                        <td>${module.effectifMax}</td>
                        <td>
                            <input type="checkbox" disabled="disabled"
                                   ${module.estTermine ? "checked=\"checked\"" : ""} />
                        </td>
                    </tr>
                </logic:iterate>
            </tbody>
        </table>
    </body>
</html:html>